{% extends "../theme/bage.html" %}
{% block head %}
<title>{{ postinfo.title }}-modify</title>
<meta name="keywords"
      content="{{ postinfo.title }}">
<meta name="description" content="{{ postinfo.title }}">
{% end %}
{% block typebody %}

<div class="panel panel-black">
    <div class="panel-heading">
        {{ _('Modify') }}  - {{ postinfo.title }}
    </div>
    <div class="panel-body">
        <form method="post" class="form-horizontal" role="form" id="form_post">
            <fieldset>
                <input type="hidden" id="id_post" name="id_post" value="{{ postinfo.uid }}"/>
                <input type=hidden id="keywords" name="keywords">
                <input type=hidden id="gcat0" name="gcat0" value="q101">
                <input type=hidden name="cnt_md" value="">

                <div class="form-group">
                    <label for="title" class="col-sm-2 control-label">{{ _('Content') }}</label>

                    <div class="col-sm-10">

                        <textarea rows=10 id="title" name="title" class="form-control">{{ postinfo.title }}</textarea>
                    </div>
                </div>


                <div class="form-group">
                    <label for="logo" class="col-sm-2 control-label">{{ _('Thumbnail') }}</label>

                    <div class="col-sm-10">
                        <input id="logo" name="logo" type="text" value="{{ postinfo.logo }}" class="form-control"
                               readonly/>
                        <br>
                        <a class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal" title="{{ _('Upload thumbnail') }}">{{ _('Upload thumbnail') }}</a>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-sm-2 control-label" for="valid">是否可用</label>

                    <div class="col-sm-10">
                        <select name="valid" id="valid" class="form-control">
                            <option value="1" {% if postinfo.valid == 1 %} selected {% end %} >是</option>
                            <option value="0" {% if postinfo.valid == 0 %} selected {% end %} >否</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="sub1" class="col-sm-2 control-label"></label>

                    <div class="col-sm-10">
                        <input id="sub1" type="submit" class="btn btn-primary" value="{{_('Submit')}}"/>
                    </div>
                </div>
            </fieldset>
        </form>
        {% module upload_pic() %}
    </div>
</div>
{% end %}


